<?php
function getResponseStart($error,$msg, $total) {
	
	$response = "<response><update>";
	if ($error == true) $response = $response . "failed";
	else $response = $response . "completed";
	$response = $response . "</update><msg>" . htmlspecialchars($msg) . "</msg><total>";
	$response = $response . $total;
	$response = $response . "</total>";
	return $response;
}

function getResponseEnd() {
	return "</response>";
}
?>
